from django.conf.urls import url
from StudyPlatform.view import loginAndRegister, all_courses, video_player, play_history, search, personalCenter

urlpatterns = [
    # 搜索课程
    url(r"^search/$", search.searchCourses, name="search"),
    # 登陆
    url(r"^login/$", loginAndRegister.login, name="login"),
    # 退出登陆
    url(r"^logout/$", loginAndRegister.logout, name="logout"),
    # 注册用户
    url(r"^register/$", loginAndRegister.register, name="register"),
    # 发送验证码请求
    url(r"^getCode/$", loginAndRegister.getCode, name="getCode"),
    # 课程页面
    url(r"^courses/([a-zA-Z]+)/([a-zA-Z]+)/(\d+)/$", all_courses.allCourses, name='courses'),
    # 视频播放页面
    url(r"^videoPlayer/([a-zA-Z]+)/(\d+)/(\d+)/$", video_player.videoPlayer, name='videoPlayer'),
    # 发表评论
    url(r"^toComment/$", video_player.toComment, name="toComment"),
    # 播放历史
    url(r"^history/$", play_history.history, name="history"),
    # 清除单个播放历史
    url(r"^clearOne/$", play_history.clearOneHistory, name="clearOne"),
    # 清空播放历史
    url(r"^clearAll/$", play_history.clearAll, name="clearAll"),
    # 个人中心
    url(r"^personalCenter/$", personalCenter.personalCenter, name="personalCenter"),
]
